﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace NetBay.Core.BusinessEntities.Barcodes
{
    [DataContract]
    [KnownType(typeof(BarcodeSeparator))]
    public class BarcodeDocumentSeparator : BarcodeSeparator
    {
        #region Attributs
        
        private BarcodeSeparatorType _BarcodeSeparatorType = BarcodeSeparatorType.DocumentSeparator;

        #endregion

        #region Properties

        /// <summary>
        /// Gets or sets the param code.
        /// </summary>
        /// <value>The param code.</value>
        [DataMember]
        public string ParamCode { get; set; }

        /// <summary>
        /// Gets or sets the PDF merge.
        /// </summary>
        /// <value>The PDF merge.</value>
        [DataMember]
        public bool PdfMerge { get; set; }

        /// <summary>
        /// Gets or sets the item id.
        /// </summary>
        /// <value>The item id.</value>
        [DataMember]
        public long ItemIdentifier { get; set; }

        /// <summary>
        /// Gets or sets the item code.
        /// </summary>
        /// <value>The item code.</value>
        [DataMember]
        public string ItemCode { get; set; }

        /// <summary>
        /// Gets or sets the item name.
        /// </summary>
        /// <value>The item name.</value>
        [DataMember]
        public string ItemName { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        [DataMember]
        public string NatureName { get; set; }

        /// <summary>
        /// Gets or sets the nature identifier.
        /// </summary>
        /// <value>The nature identifier.</value>
        [DataMember]
        public long NatureIdentifier { get; set; }

        /// <summary>
        /// Gets or sets the type of barcode.
        /// </summary>
        /// <value>The type of barcode.</value>
        [DataMember]
        public override BarcodeSeparatorType TypeOfBarcode
        {
            get
            {
                return _BarcodeSeparatorType;
            }
            set
            {
                _BarcodeSeparatorType = value;
            }
        }

        #endregion

        #region Init/Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="BarcodeDocumentSeparator" /> class.
        /// </summary>
        public BarcodeDocumentSeparator()
        {
        }

        /// <summary>
        /// Only for error
        /// </summary>
        /// <param name="ErrorMessage"></param>
        public BarcodeDocumentSeparator(string errorMessage, Exception applicationException = null)
            : base(errorMessage, applicationException)
        {
        }


        #endregion

        public override object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
